<?php
/**
 * Theme the side block.
 * 
 * Available variables:
 *   $data: 					an array of data
 */
?>

<div class="item-list">
	<ul>
		<?php if($data['loggedIn']){?>
		<li class="first"><?php print $data['user_date']?>, 欢迎回来：</li>
		<li class="first"><a href="<?php print $_SERVER['PHP_SELF'] ?>/?q=user"><?php print $data['user_name']?></a>· 积分： <?php print $data['user_points']?></li> | 
		<li class="last"><a href=<?php print $_SERVER['PHP_SELF'] ?>/?q=user/logout>退出</a></li>
		<?php if($data['admin']):?> 
		|<li class="first"><a href=<?php print $_SERVER['PHP_SELF'] ?>/?q=admin>管理</a></li>
		|<li class="first"><a href=<?php print $_SERVER['PHP_SELF'] ?>/?q=admin/config/development/performance>clear</a></li>
		<?php endif?>
		<?php }else{ ?>
		<li class="first"><a href=<?php print $_SERVER['PHP_SELF'] ?>?q=user/login>登录</a></li>   
		<li class="last"><a href=<?php print $_SERVER['PHP_SELF'] ?>?q=user/register>注册</a></li>
		<?php }?>
	</ul>
</div>    